<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>BoxedGradient</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">BoxedGradient()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#3A3966"><b>BoxedGradient</b></font>(x, y, Width, Height)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>

在方框中绘制渐变。 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>x, y, Width, Height</i></td>
<td width="90%"> 
渐变框位置。梯度从当前范围<a href="backcolor.html">背景色</a>在框的中心为当前<a href="frontcolor.html">前景色</a>在框的边缘。 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>
无.


</blockquote><p><b>备注</b></p><blockquote>

添加渐变色请使用<a href="gradientcolor.html">GradientColor（）</a>命令。<br><br>注：此命令只能与<a href="../image/imageoutput.html">ImageOutput（）</a>和<a href="../gadget/canvasoutput.html">CanvasOutput（）一起使用才有效果。</a>。当使用 <a href="drawingmode.html">DrawingMode()</a> 设置了<font color="#924B72">#PB_2DDrawing_Gradient</font>时渐变只影响绘图命令。 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 400, 200, "2DDrawing Example", <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
    <b><font color="#3A3966">If</font></b> <font color="#3A3966">CreateImage</font>(0, 400, 200) <b><font color="#3A3966">And</font></b> <font color="#3A3966">StartDrawing</font>(<font color="#3A3966">ImageOutput</font>(0))
<font color="#3A3966">      Box</font>(0, 0, 400, 200, $FFFFFF)
      
<font color="#3A3966">      DrawingMode</font>(<font color="#924B72">#PB_2DDrawing_Gradient</font>)      
<font color="#3A3966">      BackColor</font>($00FFFF)
<font color="#3A3966">      FrontColor</font>($FF0000)
      
<font color="#3A3966">      BoxedGradient</font>(0, 0, 200, 200)      
<font color="#3A3966">      Circle</font>(100, 100, 100)
<font color="#3A3966">      BoxedGradient</font>(225, -100, 150, 400)
<font color="#3A3966">      Circle</font>(300, 100, 100)
      
<font color="#3A3966">      StopDrawing</font>() 
<font color="#3A3966">      ImageGadget</font>(0, 0, 0, 400, 200,<font color="#3A3966"> ImageID</font>(0))
    <b><font color="#3A3966">EndIf</font></b>
    
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

<p><img src="../HelpPictures/boxedgradient.png"></p>


</blockquote><p><b>参阅</b></p><blockquote>

<a href="gradientcolor.html">GradientColor()</a>, <a href="resetgradientcolors.html">ResetGradientColors()</a>, 
<a href="lineargradient.html">LinearGradient()</a>, <a href="circulargradient.html">CircularGradient()</a>, 
<a href="ellipticalgradient.html">EllipticalGradient()</a>, <a href="conicalgradient.html">ConicalGradient()</a>, <a href="customgradient.html">CustomGradient()</a>, 
<a href="drawingmode.html">DrawingMode()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=box.html>Box()</a> - <a href="index.html">2DDrawing 索引</a> - <a href="circle.html">Circle()</a> -&gt;<br><br>


</body></html>